package com.taldh.algorithm.array;

import org.junit.Test;

import java.util.Arrays;

public class PrintNumbers {

    public int[] printNumbers(int n) {
        int max = 0;
        if (n >= 10) {
            max = Integer.MAX_VALUE;
        }
        StringBuilder maxSb = new StringBuilder();
        for (int i = 1; i <= n; i++) {
            maxSb.append("9");
        }
        max = Integer.parseInt(maxSb.toString());
        int[] nums = new int[max];
        for (int i = 0; i < max; i++) {
            nums[i] = i+1;
        }
        return nums;
    }

    @Test
    public void test() {
        System.out.println(Arrays.toString(printNumbers(1)));
    }
}